@selectors: small, default, medium, large;

@height: 24px;
@height-indent: 4px;
@default-height: @height + @height-indent;

@size: 14px;
@size-indent: 2px;
@default-size: @size + @size-indent;

.burger-input {
  width: 100%;
  height: @default-height;
  font-size: @default-size;
  position: relative;
  box-sizing: border-box;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;

  each(@selectors, {
    &.@{value} {
      height: @height + (@index - 1) * @height-indent;
    }
  });

  &:hover {
    border-color: #409eff;
  }

  &:active,
  &:focus {
    border-color: #409eff;
    box-shadow: 0 0 2px #409eff;
  }

  &-inner {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0 4px;
    border-radius: 3px;
    outline: none;
    font-size: @default-size;
    &::placeholder {
      font-size: @size;
      color: #999;
    }

    each(@selectors, {
      @_size: @size + (@index - 1) * @size-indent;
      &.@{value} {
        font-size: @_size;
        &::placeholder {
          font-size: @_size - 2px;
        }
      }
    });

    &:read-only {
      cursor: pointer;
    }

    &.disabled {
      user-select: none;
      -webkit-user-select: none;
      cursor: not-allowed;
    }
  }

  &-suffix {
    position: absolute;
    cursor: pointer;
    height: 100%;
    right: 4px;
    display: flex;
    align-items: center;
    pointer-events: none;

    .icon {
      display: flex;
      align-items: center;
      cursor: pointer;
      border-radius: 50%;
      transition: all 0.2s;
      user-select: none;
      -webkit-user-select: none;
      pointer-events: all;
      width: @default-size;

      each(@selectors, {
        &.@{value} {
          width: @size + (@index - 1) * @size-indent;
        }
      });
    }
  }

  &.disabled {
    cursor: not-allowed;
    background-color: #f0f0f0;
    opacity: 0.5;

    &:hover,
    &:active,
    &:focus {
      border-color: #dcdfe6;
      box-shadow: none;
    }
  }
}

.one-icon {
  .burger-input-inner {
    padding-right: 24px;

    each(@selectors, {
      &.@{value} {
        padding-right: 22px + (@index - 1) * 2px;
      }
    });
  }
}

.two-icon {
  .burger-input-inner {
    padding-right: 40px;

    each(@selectors, {
      &.@{value} {
        padding-right: 36px + (@index - 1) * 4px;
      }
    });
  }
}

.shadow {
  border-color: #409eff;
  box-shadow: 0 0 2px #409eff;
}

.burger-textarea {
  padding: 4px;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 4px;
  outline: none;
  font-size: @default-size;

  &::placeholder {
    font-size: @size;
    color: #999;
  }

  &.disabled {
    cursor: not-allowed;
  }
}
